DXL error with standard Export to Spreadsheet

Hello all,

 

I have one user getting the following error from the DOORS File > Export > Spreadsheet script:

 

-R-W- DXL: <utils/openModulesMemoryManagement.inc:141> module not closed: invalid module

Backtrace:

            <utils/openModulesMemoryManagement.inc:162>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:352>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:400>

-R-W- DXL: <utils/openModulesMemoryManagement.inc:141> module not closed: invalid module

Backtrace:

            <utils/openModulesMemoryManagement.inc:162>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:352>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:400>

-R-W- DXL: <utils/openModulesMemoryManagement.inc:141> module not closed: invalid module

Backtrace:

            <utils/openModulesMemoryManagement.inc:162>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:352>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:400>

-R-W- DXL: <utils/openModulesMemoryManagement.inc:141> module not closed: invalid module

Backtrace:

            <utils/openModulesMemoryManagement.inc:162>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:352>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:400>

-R-W- DXL: <utils/openModulesMemoryManagement.inc:141> module not closed: invalid module

Backtrace:

            <utils/openModulesMemoryManagement.inc:162>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:352>

            <C:\Program Files (x86)\IBM\Rational\DOORS\9.5/lib/dxl/standard/export/commas.dxl:400>

 

 

I've poked around a little bit in the DXL, but I didn't learn anything useful and I really have no idea what to do about it.  Its only one user having the issue, and only on one module.  We tried restarting DOORS and it didn't help, and we've tried both read-only and exclusive edit with no difference.  We have custom export scripts, so we can get around it, but its concerning that this is coming from the DOORS out of the box scripts.

 

Does anyone have any idea what this is about or know what to do to fix it?

 

Thanks!!


emily.butt - Mon Dec 23 08:07:26 EST 2013

Re: DXL error with standard Export to Spreadsheet
Mathias Mamsch - Mon Dec 23 09:38:10 EST 2013

This is a warning that seems to be generated from one of your own libraries. Check the openModulesMemoryManagement.inc in line 141 ... You will either

  • see a close statement there (which probably means that the openModulesMemoryManagement.inc library is not doing a very good job after all and trying to close a module that was already closed, probably as a result of a trigger / attribute DXL / layout DXL that interfered in that special case)
  • see a warn statement that is issued by a check in the openModulesMemoryManagement.inc library which detected that a module that should not be closed was already closed and will therefore not be closed by the library. Such a thing seems to be useful for developers but very confusing for users, and in this case I would just remove the warning message for code deployed to a production system.

However my guess is alternative a). So in this case you can

1.) find out, which trigger/attribute dxl/layout dxl is closing the module that was opened by openModulesMemoryManagement.inc  and correct that trigger/layout DXL/attribute DXL to only close modules it opened itself

2) put an additional check in the openModulesMemoryManagament.inc to find out if a module is still open before trying to close it again.

I would go with 2, although if that is possible largely depends on the openModulesMemoryManagement.inc library. If that library only stores Module handles then it looses all information once the module is closed. So a much better alternative is to store ModuleVersions and check before closing if that ModuleVersion is still opened.

Regards, Mathias

Re: DXL error with standard Export to Spreadsheet
emily.butt - Tue Dec 31 10:01:00 EST 2013

Mathias Mamsch - Mon Dec 23 09:38:10 EST 2013

This is a warning that seems to be generated from one of your own libraries. Check the openModulesMemoryManagement.inc in line 141 ... You will either

  • see a close statement there (which probably means that the openModulesMemoryManagement.inc library is not doing a very good job after all and trying to close a module that was already closed, probably as a result of a trigger / attribute DXL / layout DXL that interfered in that special case)
  • see a warn statement that is issued by a check in the openModulesMemoryManagement.inc library which detected that a module that should not be closed was already closed and will therefore not be closed by the library. Such a thing seems to be useful for developers but very confusing for users, and in this case I would just remove the warning message for code deployed to a production system.

However my guess is alternative a). So in this case you can

1.) find out, which trigger/attribute dxl/layout dxl is closing the module that was opened by openModulesMemoryManagement.inc  and correct that trigger/layout DXL/attribute DXL to only close modules it opened itself

2) put an additional check in the openModulesMemoryManagament.inc to find out if a module is still open before trying to close it again.

I would go with 2, although if that is possible largely depends on the openModulesMemoryManagement.inc library. If that library only stores Module handles then it looses all information once the module is closed. So a much better alternative is to store ModuleVersions and check before closing if that ModuleVersion is still opened.

Regards, Mathias

Thanks for you reply, Mathias.

 

Fortunately, this problem seems to have vanished.  It does have a close statement on line 141, and option 2 does sound like the best solution, so I will remember that if the problem reappears (hopefully it doesn't!)

 

Thanks again!

-Emily

Re: DXL error with standard Export to Spreadsheet
llandale - Tue Jan 07 14:57:17 EST 2014

You get that same error with this code:

  • Module m = read("SomeModule")
  • close(m)
  • close(m)

So I conclude the module is already closed by the time you send the "Module" variable to line 141.

Likely is MM's 1.); and I emphasise the last phrase therein.  To find out if it is already open; something like this:

  • mod = module(item(NameModFull))
  • if (!null mod) //
  • then NameModFull already open
  • else mod = read(NameModFull, false, true)

Impractical is MM's 2.) since you will get other errors trying to use a "Module" variable of a closed module.  I'd be tempted to replace #141 with:

  • noError(); close(m) ; string ErrMess = lastError(); if (!null ErrMess) print ErrMess

Thus trapping and reporting the error and moving on, rather than trying to predict the error and avoid it.

-Louie

Re: DXL error with standard Export to Spreadsheet
llandale - Tue Jan 07 14:58:57 EST 2014

Incidentally, I did some crude testing vis-a-vis corrupted module handles and I deduced that sometimes you CAN use a "Module" handle of a closed module, but after a couple seconds it becomes corrupted.  This could explain why you get errors some of the time.

-Louie